$(function(){
	$(document).on("click","#verify_employer",function(){
        $.ajax({
            url:"/verify",
            type:'post',
            data:{},
            dataType:'json',
            success:function(data){
                if(data.stats=='success'){
                    setTimeout(function(){
                        window.location.href = "/cate?network=reception";
                    },2000);
                }else{
                    if(data.stats=='login') {
                        globalTip({"msg":data.msg,"setTime":3});
                        setTimeout(function(){
                            window.location.href = "http://ui.cn/login.html";
                        },2000);
                    } else {
                        globalTip({"msg":data.msg,"setTime":3});
                        setTimeout(function(){
                            window.location.href = "http://account.ui.cn/accountinfo.html";
                        },2000);
                    }
                    return false;
                }
            },
            error:function(){
                globalTip({"msg":"请求错误,请重试！","setTime":3});
                return false;
            },
        });
    });

    $(document).on("click","#verify_user",function(){
        $.ajax({
            url:"/verify",
            type:'post',
            data:{},
            dataType:'json',
            success:function(data){
                if(data.stats=='success'){
                    setTimeout(function(){
                        window.location.href = "/lists?act=enroll";
                    },2000);
                }else{
                    if(data.stats=='login') {
                        globalTip({"msg":data.msg,"setTime":3});
                        setTimeout(function(){
                            window.location.href = "http://ui.cn/login.html";
                        },2000);
                    } else {
                        globalTip({"msg":data.msg,"setTime":3});
                        setTimeout(function(){
                            window.location.href = "http://account.ui.cn/accountinfo.html";
                        },2000);
                    }
                    return false;
                }
            },
            error:function(){
                globalTip({"msg":"请求错误,请重试！","setTime":3});
                return false;
            },
        });
    });	
});